﻿using System;
using System.Collections.Generic;
using System.Linq;
//using System.Threading;
using System.Web;
using DrillOnline.Hubs;
using Microsoft.AspNet.SignalR;
using DrillOnline.Services.Scenarios;

namespace DrillOnline.Services
{

    public class DrillSession :ISession
    {
        public DrillScenario DrillScenarios { get; set; }
        public IScenarios Scenarios { get { return DrillScenarios; } set { DrillScenarios = value; } }

        private  DrillHubUtility hubUtility;
        public DrillSession()
        {
            hubUtility = new DrillHubUtility();
        }
      
        public override void BroadcastUpdatedScenes(ActorGroup g, IList<DrillScene> sl)
        {
            hubUtility.BroadcastUpdatedScenes(g,sl,this);
        }

        public override void BroadcastScenariosSettings()
        {
            hubUtility.BroadcastScenariosSettings(this);
        }

        public void Dispose()
        {
            Scenarios.Dispose();
        }

        
        public void NotifyTimelineUpdated(Timeline.TickerEventArgs e)
        {
            hubUtility.BroadcastNotify(this);
        }

        public List<ActorGroup> Groups
        {
            get;
            set;
        }

        public List<string> Examiners
        {
            get;
            set;
        }
    }


}